

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>报警综合信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-card-header plan-title">报警综合信息</div>
    <div class="layui-card">
      <div class="layui-card-body alarmComprehensiveWrap">
        <div style="padding-bottom: 10px">
          <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">系统名:</label>
                <div class="layui-input-block">
                    <input type="text" name="alarmSystem" placeholder="请输入" autocomplete="off" class="layui-input">
                </div>
              </div>
            <div class="layui-inline">
                <label class="layui-form-label">设备名:</label>
                <div class="layui-input-block">
                    <input type="text" name="alarmDevice" placeholder="请输入" autocomplete="off" class="layui-input">
                </div>
            </div>
              <div class="layui-inline">
                <label class="layui-form-label">车站:</label>
                <div class="layui-input-block">
                  <select name="alarmStation" id="stationList" lay-filter="stationListFilter">
                    <option value="">请选择</option>
                  </select>
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">状态:</label>
                <div class="layui-input-block">
                    <select name="regainStatu" id="statusList" lay-filter="statusListFilter">
                        <option value="">请选择</option>
                        <option value="1">未恢复</option>
                        <option value="0">已恢复</option>
                    </select>
                </div>
            </div>
              <div class="layui-inline">
                <label class="layui-form-label">报警等级:</label>
                <div class="layui-input-block">
                  <select name="rank" id="alarmLevels" lay-filter="statusListFilter">
                    <option value=""></option>
                  </select>
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">开始时间</label>
                <div class="layui-input-block">
                  <i class="layui-icon layui-icon-date"></i>
                  <input type="text" name="startDate" placeholder="请输入"  autocomplete="off" class="layui-input" id="startDate">
                </div>
              </div>
              <div class="layui-inline">
                <label class="layui-form-label">结束时间 </label>
                <div class="layui-input-block">
                  <i class="layui-icon layui-icon-date"></i>
                  <input type="text" name="endDate" placeholder="请输入" autocomplete="off" class="layui-input" id="endtDate">
                </div>
              </div>
              <div class="layui-inline">
                <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-back-search">
                  <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                  查询
                </button>
              </div>
            </div>
          </div>
        </div>
        <table id="alarmComprehensive" lay-filter="alarmComprehensive"></table>
        <script type="text/html" id="alarmRank">
          {{#  if(d.alRank == '1'){d.alRank = '一级'}}
          {{d.alRank}}
          {{#  } else if (d.alRank == '2'){d.alRank = '二级' }}
          {{d.alRank}}
          {{#  } else if (d.alRank == '3'){d.alRank = '三级' }}
          {{d.alRank}}
          {{#  } else {d.alRank = '四级' }}
          {{d.alRank}}
          {{#  } }}
        </script>
        <script type="text/html" id="regainStatu">
          {{#  if(d.regainStatu == '1'){d.regainStatu = '未恢复'}}
          {{d.regainStatu}}
          {{#  } else {d.regainStatu = '已恢复' }}
          {{d.regainStatu}}
          {{#  } }}
        </script>
        <!-- <script type="text/html" id="img">
          {{#  if(d.alRank == 1){d.alRank = 1}}
          <img src="../../layuiadmin/images/alarmRank1.jpg"/>
          {{#  } else if(d.alRank == 2){d.alRank =2}}
          <img src="../../layuiadmin/images/alarmRank2.jpg"/>
          {{#  } else if(d.alRank == 3){d.alRank =3}}
          <img src="../../layuiadmin/images/alarmRank3.jpg"/>
          {{#  } else {d.alRank = 4 }}
          <img src="../../layuiadmin/images/alarmRank4.jpg"/>
          {{#  } }}
        </script>
        <script type="text/html" id="way">
          <div class="wayBox">
            <h3>{{d.alStation}}</h3>
            <h3>报警等级:{{d.alRank}}级</h3>
            <h3>报警状态:{{d.regainStatu === "1" ? " 未恢复":"已恢复"}}</h3>
          </div>
        </script>
        <script type="text/html" id="wayName">
          <div class="wayName">
          <h3>{{d.deviceCn}}</h3>
          <p>{{d.alMsg}}</p>
          </div>
        </script>
        <script type="text/html" id="wayTime">
          <div class="time">
            <h3>上报时间{{d.alTime}}</h3>
          </div>
        </script> -->
        <script type="text/html" id="detailOperate">
          {{# if((layui.data(layui.setter.tableName).user_info.menuAndPermissionList.indexOf('warning_synthesize_info_page:detailed_info')) > -1){ }}
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">查看详情</a>
          {{# } }}
        </script>
      </div>
    </div>
  </div>

  <script src="../../layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
    , my_send: '../myModules/my_send'
  }).use(['index', 'alarmManagement', 'table','laydate'], function(){
    var $ = layui.$
    ,form = layui.form
    ,table = layui.table
    , my_send = layui.my_send
    , http_proxy = layui.http_proxy;
    var laydate = layui.laydate;
        //日期范围
        laydate.render({
          elem: '#startDate'
          ,trigger: 'click'
          ,position:'fixed'
        });
        laydate.render({
          elem: '#endtDate'
          ,trigger: 'click'
          ,position:'fixed'
        });
      //点击查询按钮，重载表格
      form.on('submit(LAY-user-back-search)', function (data) {
        //执行重载
        table.reload('alarmComprehensive', {
          url: http_proxy('/alertManager/queryAlarmSynMsg') //模拟接口
          , method: 'post'
          , contentType : "application/json"
          ,request: {
            pageName: 'pageNo', //页码的参数名称，默认：page
            limitName: 'pageSize' //每页数据量的参数名，默认：limit
          }
          ,where: data.field
        });
      });
   //事件
    // $('.layui-btn.layuiadmin-btn-useradmin').on('click', function(){
    //   var type = $(this).data('type');
    //   active[type] ? active[type].call(this) : '';
    // });
  });
  </script>
</body>
</html>
